import { consts, utils } from '../common'

module.exports = () =>
  function locals(req, res, next) {
    res.locals.production = req.app.get('env') === 'production'
    res.locals.asset_path = utils.getAssetPath(req, consts.ASSET_PATH)
    res.locals.publicPath = consts.BASE_PATH
    res.locals.title = consts.TITLE
    next()
  }
